//
//  SuggsetViewController.m
//  penzer
//
//  Created by caiyc on 2018/10/16.
//  Copyright © 2018年 caiyc. All rights reserved.
//

#import "SuggsetViewController.h"

@interface SuggsetViewController ()<UITextViewDelegate>
@property (weak, nonatomic) IBOutlet UIScrollView *botomScroView;
@property (weak, nonatomic) IBOutlet UIView *topView;
@property (weak, nonatomic) IBOutlet UITextView *suggest_Tv;
@property(nonatomic,strong)NSString *tel;

@end

@implementation SuggsetViewController
- (IBAction)contact:(UIButton *)sender {
    NSURL *url =[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",self.tel]];
    [[UIApplication sharedApplication]openURL:url];
}
- (IBAction)submit:(id)sender {
    if([self.back_Tf.text isEqualToString:@""]){
        [WToast showWithText:@"请输入"];
    }else{
        [WToast showWithText:@"反馈成功"];
        [self.navigationController popViewControllerAnimated:1];
    }
}
-(void)loadData{
   // http://dev.sharepanzer.com/api/bzapi.php?i=10&c=entry&m=bz_activities&ctrl=common&ac=live&ta=get_customer_service_mobile
    NSDictionary *paramter = @{@"ctrl":@"common",@"ac":@"live",@"ta":@"get_customer_service_mobile"};
    [self weqPostHandle:paramter success:^(id response) {
        if(response){
            self.tel = response[@"data"][@"mobile"];
        }
    } failure:^(NSError *error) {
        
    }];
}
- (void)viewDidLoad {
    [super viewDidLoad];
      [self setNavigation:1 andTitle:@"意见反馈" andNaviColor:[UIColor clearColor] andTitleColor:nil];
    self.back_Tf.delegate = self;
    self.suggest_Tv.layer.cornerRadius = 5;
    self.suggest_Tv.layer.masksToBounds = 1;
    self.topView.layer.cornerRadius = 5;
    self.topView.layer.masksToBounds = 1;
    self.tel = @"028-67171871";
    [self loadData];
    // Do any additional setup after loading the view from its nib.
}
-(void)textViewDidBeginEditing:(UITextView *)textView{
    self.mutable_Lab.hidden = 1;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
